package com.example.support.spring;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;

@org.springframework.stereotype.Component
public class SpringContextHolder implements org.springframework.context.ApplicationContextAware {

	private static ApplicationContext applicationContext;

	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		SpringContextHolder.applicationContext = applicationContext;
	}

	public static ApplicationContext getContext() {
		return SpringContextHolder.applicationContext;
	}

}
